Skip to content

connectGatt is successful without previous gatt not being closed#620

Merged
philips77 merged 1 commit intonordicsemi:mainfrom
junebeans:gatt-stays-open-in-background
Jun 5, 2025
Merged

connectGatt is successful without previous gatt not being closed#620
philips77 merged 1 commit intonordicsemi:mainfrom
junebeans:gatt-stays-open-in-background

Conversation

@junebeans
Copy link
Copy Markdown
Contributor

In some cases, there were race condition where the previous gatt was not closed, but bluetoothGatt gets overridden due to the next connectGatt call being executed. With this previous gatt client not closed - it remains in memory keep consuming assigned seat for ble gatt on operating system.

This pull request ensures to close the gatt object before the next connectGatt is executed.

… being called resulting resources allocated for gatt is not released until the application is stopped/killed
@junebeans junebeans changed the title Fixes issue where gatt is not closed before the next 'connectGatt' is… connectGatt is successful without previous gatt not being closed May 29, 2025
@philips77 philips77 merged commit 78ad90d into nordicsemi:main Jun 5, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants